package 设计模式.行为型.command命令.spingboot.command;

import 设计模式.行为型.command命令.spingboot.Light;

/**
 * 开灯命令
 *
 * @author: 张从龙
 * time: 2022/8/14 19:39
 */
public class SwitchOnCommand implements Command {

    private final Light light;

    public SwitchOnCommand(Light light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.turnOn();
    }
}
